Repository navigation
Conversation
This was referenced Nov 24, 2026
4 tasks done
This was referenced Nov 25, 2026
Collaborator
|
Thanks a lot for this, @Andretuta. We checked and this pull request is a draft that #1831 states it supersedes (same three files); the kept one is #1831. To keep the queue clear and avoid reviewing the same change twice, I am closing this one in favour of #1831. If you think this is a mistake, please reopen it and let us know. AI-assisted (Claude Code, Claude Opus 5.5). |
MoonEyes
added a commit
that referenced
this pull request
Nov 29, 2026
gameinput: preserve controller transitions between polls (OLD-9966, carries #233)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):@ItsNotRexed: an exe PR, as you asked.What
The GameInput shim now keeps button and axis changes that happen between two polls. Each poll drains SDL's gamepad button and axis events; for each connected pad, events with the same SDL timestamp form one sample. Intermediate samples go into the reading history and to reading/Guide callbacks, and the final reading still comes from the current pad snapshot (so motion and raw HID state are unchanged). GameInput timestamps still record when the shim polled.
docs/gameinput.mddescribes the behaviour and drops the old "a change shorter than one poll is not seen" caveat.Why
The shim read the pad's state once per poll, so a short press (a button tapped and released, or a trigger pulled and let go) between two polls never reached the history or a callback and the title missed the input.
Tested
Built locally with clang-cl 19 + lld-link against the xwin SDK and SDL3 3.4.20 (static), run under Wine:
gameinput_test.exe.366 checks, 0 failures.gameinput.cppfrom origin/main):366 checks, 2 failures(both new checks: "history delivers both the short A/trigger press and its release", "two callbacks fire and the current reading stays released").test_buffered_gamepad_input, 42 lines inruntime/test/gameinput_test.cpp. It presses A and the left trigger on a virtual pad, releases them before the next shim poll, and checks the history holds both the press and the release, two callbacks fire, and the current reading is the released one.